/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>

#import "OFXSecurity.h"
#import "OFXInvestmentTransaction.h"
#import "OFXInvestmentAccount.h"

@interface OFXInvestmentIncomeTransaction : OFXInvestmentTransaction {
  OFXSecurity* security;
  NSString* incomeType;
  
  NSString* securitySubAccount;
  NSString* fundingSubAccount;
  
  bool taxExempt;
  NSNumber* taxWithholding;
  
  OFXCurrency* originalCurrency;
}

/**
 * @property security
 * @brief Underlying security involved in transaction.
 */
@property(retain) OFXSecurity* security;

/**
 * @property incomeType
 * @brief Type of investment income.
 * 
 * Valid values:
 * - CGLONG (capital gains-long term)
 * - CGSHORT (capital gains-short term)
 * - DIV (dividend)
 * - INTEREST
 * - MISC
 */
@property(retain) NSString* incomeType;

/**
 * @property securitySubAccount
 * @brief Sub-account type for the security: CASH, MARGIN, SHORT, OTHER
 */
@property(retain) NSString* securitySubAccount;

/**
 * @property fundingSubAccount
 * @brief Where did the money for the transaction come from or go to? 
 * 
 * Valid values:
 * - CASH
 * - MARGIN
 * - SHORT
 * - OTHER
 */
@property(retain) NSString* fundingSubAccount;

/**
 * @property taxExempt
 * @brief Indicates if the transaction is tax exempt
 */
@property(assign) bool taxExempt;

/**
 * @property taxWithholding
 * @brief Amount of tax withholding.
 */
@property(retain) NSNumber* taxWithholding;

/**
 * @property originalCurrency
 * @brief Original currency of transaction.
 */
@property(retain) OFXCurrency* originalCurrency;

@end
